import request from '@/utils/request'
import {projectApiUrl} from '../config'
/**
 * 大客户列表（分页）
 * @param parameter
 */
export function getCustomerList(params){
  return request({
    url: projectApiUrl+'/projects/bigcustomers',
    method: 'get',
    params
  })
}

/**
 * 查看大客户详情
 * @param parameter
 */
export function getCustomersOne(customerId){
  return request({
    url: projectApiUrl+'/projects/bigcustomers/'+customerId,
    method: 'get',
    data:customerId
  })
}

/**
 * 新增大客户
 * @param parameter
 */
export function addCustomers(data){
  return request({
    url: projectApiUrl+'/projects/bigcustomers',
    method: 'post',
    data: data
  })
}

/**
 * 编辑大客户
 * @param parameter
 */
export function editCustomers(data){
  return request({
    url: projectApiUrl+'/projects/bigcustomers/update',
    method: 'post',
    data: data
  })
}


/**
 * 获取大客户层级
 * @param parameter
 */
export function getCustomersLevel(data){
  return request({
    url: projectApiUrl+'/projects/bigcustomers/customer-typesAndLevels',
    method: 'get',
    data: data
  })
}


/**
 * 删除大客户
 * @param parameter
 */
export function delCustomers(data){
  return request({
    url: projectApiUrl+'/projects/bigcustomers/delete',
    method: 'post',
    data: data
  })
}